package com.atguigu.lease.common.login;

/**
 * @author Marco
 * @Description
 * @date 2025/8/6 2:27
 * @email 3293336923@qq.com
 */
public class LoginUserHolder {

    private    static   ThreadLocal<LoginUser>   userThreadLocal = new ThreadLocal<>();


    public    static   void    setLoginUser(LoginUser loginUser){
        userThreadLocal.set(loginUser);
    }

    public   static    LoginUser   getLoginUser(){
        return    userThreadLocal.get();
    }

    public   static     void     clear(){
        userThreadLocal.remove();
    }
}
